/*
 * Created on 2004-09-10
 */
package org.opencube.util;

import java.util.HashMap;

/**
 * @author <a href="mailto:maciek@fingo.pl">Maciej Mroczko - FINGO</a>
 *
 * TODO comments
 */
public class Key
{
	private static HashMap keys = new HashMap();
	
	/**
	 * 
	 */
	private Key()
	{
		super();
	}
	
	public static Key getKey( Object key )
	{
		Key k = (Key) keys.get( key );
		if( k == null )
		{
			k = new Key();
			keys.put( key, k );
		}
		return k;
	}
	
	public static void clear()
	{
		keys.clear();
	}
	
	public static int getKeysCount()
	{
		return keys.size();
	}
}
